﻿using System;
using System.Collections.Generic;
using System.Windows.Forms;
using KBEngine;

namespace KBEngineTool.UI
{
    /*
        1.Entity中的type类型数组定义, 是可以无限套的  暂只实现至第一层
    */

    static class Program
    {
        static KBEngine.clientapp _clientApp;
        static Timer _timerTick;

        static void EventTick(object sender, EventArgs e)
        {
            _clientApp.Tick();
        }

        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            _clientApp = Operation.Inst.ClientApp;
            if (!_clientApp.Init())
            {
                MessageBox.Show("事件存在重名,详细信息查看输出.");
                return;
            }
            _timerTick = new Timer();
            _timerTick.Interval = Time.deltaMilliseconds;
            _timerTick.Tick += EventTick;
            _timerTick.Start();
            Application.Run(new MainWindow());
        }
    }
}
